package cn.itsource.controller.app;

import cn.itsource.pojo.bo.WXPayBo;
import cn.itsource.result.R;
import cn.itsource.service.IPayOrderService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 📖：beishan
 * 🗓️：2024/4/22 19:16
 * =====================
 */
@RestController
@RequestMapping("/app/customer")
public class CustomerController {

    @Autowired
    private IPayOrderService orderService;

    @Operation( summary= "微信付款",description = "微信付款")
    @PostMapping("/pay/{orderNo}")
    public R pay(@PathVariable String orderNo){
        WXPayBo wxPayBo = orderService.pay(orderNo);
        return R.success(wxPayBo);
    }

}
